package com.bestcem.xm.member.enums;

import com.bestcem.xm.common.core.enums.CommonEnum;

/**
 * @author ming.xue <ming.xue@idiaoyan.com>
 * @desc 导出状态
 * @date 2021-07-24
 */
public enum ExportStatusEnum implements CommonEnum {
    /**
     * 生成中
     */
    PROCESSING("生成中", 0),

    /**
     * 下载成功
     */
    SUCCESS("下载成功", 1),

    /**
     * 下载失败
     */
    FAILED("下载失败", 2),

    /**
     * 等待中
     */
    WAITING("等待中", 3);

    private String name;

    private int index;

    ExportStatusEnum(String name, int index) {
        this.name = name;
        this.index = index;
    }

    public int getIndex() {
        return index;
    }

    public String getName() {
        return name;
    }

    public boolean matches(int index){
        return this.index == index;
    }
}
